<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>module TypeProf::Builtin - typeprof: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="module">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-file_load">::file_load</a>
    <li ><a href="#method-c-file_require">::file_require</a>
    <li ><a href="#method-c-setup_initial_global_env">::setup_initial_global_env</a>
    <li ><a href="#method-i-array_aref">#array_aref</a>
    <li ><a href="#method-i-array_aset">#array_aset</a>
    <li ><a href="#method-i-array_pop">#array_pop</a>
    <li ><a href="#method-i-get_sym">#get_sym</a>
    <li ><a href="#method-i-hash_aref">#hash_aref</a>
    <li ><a href="#method-i-hash_aset">#hash_aset</a>
    <li ><a href="#method-i-kernel_Array">#kernel_Array</a>
    <li ><a href="#method-i-kernel_autoload">#kernel_autoload</a>
    <li ><a href="#method-i-kernel_p">#kernel_p</a>
    <li ><a href="#method-i-kernel_require">#kernel_require</a>
    <li ><a href="#method-i-kernel_require_relative">#kernel_require_relative</a>
    <li ><a href="#method-i-lambda">#lambda</a>
    <li ><a href="#method-i-module_attr_accessor">#module_attr_accessor</a>
    <li ><a href="#method-i-module_attr_reader">#module_attr_reader</a>
    <li ><a href="#method-i-module_attr_writer">#module_attr_writer</a>
    <li ><a href="#method-i-module_autoload">#module_autoload</a>
    <li ><a href="#method-i-module_define_method">#module_define_method</a>
    <li ><a href="#method-i-module_eqq">#module_eqq</a>
    <li ><a href="#method-i-module_extend">#module_extend</a>
    <li ><a href="#method-i-module_include">#module_include</a>
    <li ><a href="#method-i-module_module_function">#module_module_function</a>
    <li ><a href="#method-i-module_prepend">#module_prepend</a>
    <li ><a href="#method-i-module_private">#module_private</a>
    <li ><a href="#method-i-module_public">#module_public</a>
    <li ><a href="#method-i-object_block_given-3F">#object_block_given?</a>
    <li ><a href="#method-i-object_class">#object_class</a>
    <li ><a href="#method-i-object_enum_for">#object_enum_for</a>
    <li ><a href="#method-i-object_instance_eval">#object_instance_eval</a>
    <li ><a href="#method-i-object_is_a-3F">#object_is_a?</a>
    <li ><a href="#method-i-object_module_eval">#object_module_eval</a>
    <li ><a href="#method-i-object_privitive_method">#object_privitive_method</a>
    <li ><a href="#method-i-object_respond_to-3F">#object_respond_to?</a>
    <li ><a href="#method-i-object_s_new">#object_s_new</a>
    <li ><a href="#method-i-object_send">#object_send</a>
    <li ><a href="#method-i-proc_call">#proc_call</a>
    <li ><a href="#method-i-struct_initialize">#struct_initialize</a>
    <li ><a href="#method-i-struct_s_new">#struct_s_new</a>
    <li ><a href="#method-i-vmcore_hash_merge_kwd">#vmcore_hash_merge_kwd</a>
    <li ><a href="#method-i-vmcore_raise">#vmcore_raise</a>
    <li ><a href="#method-i-vmcore_set_method_alias">#vmcore_set_method_alias</a>
    <li ><a href="#method-i-vmcore_undef_method">#vmcore_undef_method</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="module-TypeProf::Builtin">
    <h1 id="module-TypeProf::Builtin" class="module">
      module TypeProf::Builtin
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-file_load" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">file_load</span><span
                                class="method-args">(path, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="file_load-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 626</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">file_load</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">iseq</span>, = <span class="ruby-constant">ISeq</span>.<span class="ruby-identifier">compile</span>(<span class="ruby-identifier">path</span>)
  <span class="ruby-identifier">callee_ep</span>, <span class="ruby-identifier">callee_env</span> = <span class="ruby-constant">TypeProf</span>.<span class="ruby-identifier">starting_state</span>(<span class="ruby-identifier">iseq</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">merge_env</span>(<span class="ruby-identifier">callee_ep</span>, <span class="ruby-identifier">callee_env</span>)

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_callsite!</span>(<span class="ruby-identifier">callee_ep</span>.<span class="ruby-identifier">ctx</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_ret_ty</span>, <span class="ruby-identifier">ep</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">ret_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>])
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ret_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-file_require" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">file_require</span><span
                                class="method-args">(feature, scratch)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="file_require-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 637</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">file_require</span>(<span class="ruby-identifier">feature</span>, <span class="ruby-identifier">scratch</span>)
  <span class="ruby-comment"># XXX: dynamic RBS load is really needed??  Another idea:</span>
  <span class="ruby-comment">#</span>
  <span class="ruby-comment"># * RBS should be loaded in advance of analysis</span>
  <span class="ruby-comment"># * require &quot;some_gem/foo&quot; should be ignored</span>
  <span class="ruby-comment"># * require &quot;app/foo&quot; should always load .rb file (in this case, app/foo.rb)</span>
  <span class="ruby-keyword">return</span> <span class="ruby-value">:done</span>, <span class="ruby-value">:true</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Import</span>.<span class="ruby-identifier">import_library</span>(<span class="ruby-identifier">scratch</span>, <span class="ruby-identifier">feature</span>)

  <span class="ruby-comment"># Try to analyze the source code of the gem</span>
  <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">gem</span> <span class="ruby-identifier">feature</span>
  <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">MissingSpecError</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">LoadError</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">filetype</span>, <span class="ruby-identifier">path</span> = <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">resolve_feature_path</span>(<span class="ruby-identifier">feature</span>)

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">filetype</span> <span class="ruby-operator">==</span> <span class="ruby-value">:rb</span>
      <span class="ruby-keyword">return</span> <span class="ruby-value">:done</span>, <span class="ruby-value">:false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">loaded_files</span>[<span class="ruby-identifier">path</span>]
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">loaded_files</span>[<span class="ruby-identifier">path</span>] = <span class="ruby-keyword">true</span>

      <span class="ruby-keyword">return</span> <span class="ruby-value">:do</span>, <span class="ruby-identifier">path</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span>(<span class="ruby-identifier">path</span>)

      <span class="ruby-keyword">return</span> <span class="ruby-value">:error</span>, <span class="ruby-node">&quot;failed to load: #{ path }&quot;</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-keyword">return</span> <span class="ruby-value">:error</span>, <span class="ruby-node">&quot;cannot load a .so file: #{ path }&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">rescue</span> <span class="ruby-constant">LoadError</span>
    <span class="ruby-keyword">return</span> <span class="ruby-value">:error</span>, <span class="ruby-node">&quot;failed to require: #{ feature }&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-setup_initial_global_env" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">setup_initial_global_env</span><span
                                class="method-args">(scratch)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="setup_initial_global_env-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 785</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">setup_initial_global_env</span>(<span class="ruby-identifier">scratch</span>)
  <span class="ruby-identifier">klass_basic_obj</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">new_class</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-value">:BasicObject</span>, [], <span class="ruby-value">:__root__</span>, <span class="ruby-keyword">nil</span>) <span class="ruby-comment"># cbase, name, superclass</span>
  <span class="ruby-identifier">klass_obj</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">new_class</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-value">:Object</span>, [], <span class="ruby-identifier">klass_basic_obj</span>, <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Object</span>, <span class="ruby-identifier">klass_obj</span>, <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:BasicObject</span>, <span class="ruby-identifier">klass_basic_obj</span>, <span class="ruby-keyword">nil</span>)

  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:basic_obj</span>] = <span class="ruby-identifier">klass_basic_obj</span>
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:obj</span>]   = <span class="ruby-identifier">klass_obj</span>

  <span class="ruby-constant">Import</span>.<span class="ruby-identifier">import_builtin</span>(<span class="ruby-identifier">scratch</span>)

  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:vmcore</span>]     , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">new_class</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:VMCore</span>, [], <span class="ruby-identifier">klass_obj</span>, <span class="ruby-keyword">nil</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:int</span>]        , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Integer</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:float</span>]      , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Float</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:rational</span>]   , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Rational</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:complex</span>]    , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Complex</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:sym</span>]        , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Symbol</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:str</span>]        , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:String</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:struct</span>]     , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Struct</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:ary</span>]        , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Array</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:hash</span>]       , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Hash</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:io</span>]         , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:IO</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:proc</span>]       , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Proc</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:range</span>]      , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Range</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:regexp</span>]     , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Regexp</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:matchdata</span>]  , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:MatchData</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:class</span>]      , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Class</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:module</span>]     , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Module</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:exc</span>]        , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Exception</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:encoding</span>]   , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Encoding</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:enumerator</span>] , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Enumerator</span>)
  <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:kernel</span>]     , = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Kernel</span>)

  <span class="ruby-identifier">klass_vmcore</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:vmcore</span>]
  <span class="ruby-identifier">klass_ary</span>    = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:ary</span>]
  <span class="ruby-identifier">klass_hash</span>   = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:hash</span>]
  <span class="ruby-identifier">klass_struct</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:struct</span>]
  <span class="ruby-identifier">klass_proc</span>   = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:proc</span>]
  <span class="ruby-identifier">klass_module</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:module</span>]

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_vmcore</span>, <span class="ruby-value">:&quot;core#set_method_alias&quot;</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:vmcore_set_method_alias</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_vmcore</span>, <span class="ruby-value">:&quot;core#undef_method&quot;</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:vmcore_undef_method</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_vmcore</span>, <span class="ruby-value">:&quot;core#hash_merge_kwd&quot;</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:vmcore_hash_merge_kwd</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_vmcore</span>, <span class="ruby-value">:&quot;core#raise&quot;</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:vmcore_raise</span>))

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_vmcore</span>, <span class="ruby-value">:lambda</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:lambda</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_singleton_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:&quot;new&quot;</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_s_new</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:p</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:kernel_p</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:is_a?</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_is_a?</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:respond_to?</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_respond_to?</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:class</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_class</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:send</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_send</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:instance_eval</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_instance_eval</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:proc</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:lambda</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:__method__</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_privitive_method</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:block_given?</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_block_given?</span>), <span class="ruby-keyword">false</span>)

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:enum_for</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_enum_for</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:to_enum</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_enum_for</span>))

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:include</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_include</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:extend</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_extend</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:prepend</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_prepend</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:module_function</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_module_function</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:public</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_public</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:private</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_private</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:define_method</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_define_method</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:attr_accessor</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_attr_accessor</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:attr_reader</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_attr_reader</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:attr_writer</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_attr_writer</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:class_eval</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_module_eval</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:module_eval</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_module_eval</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:===</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_eqq</span>))

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_proc</span>, <span class="ruby-value">:[]</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:proc_call</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_proc</span>, <span class="ruby-value">:call</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:proc_call</span>))

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_ary</span>, <span class="ruby-value">:[]</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:array_aref</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_ary</span>, <span class="ruby-value">:[]=</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:array_aset</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_ary</span>, <span class="ruby-value">:pop</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:array_pop</span>))

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_hash</span>, <span class="ruby-value">:[]</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:hash_aref</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_hash</span>, <span class="ruby-value">:[]=</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:hash_aset</span>))

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_struct</span>, <span class="ruby-value">:initialize</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:struct_initialize</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_singleton_custom_method</span>(<span class="ruby-identifier">klass_struct</span>, <span class="ruby-value">:new</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:struct_s_new</span>))

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:require</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:kernel_require</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:require_relative</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:kernel_require_relative</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:Array</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:kernel_Array</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:autoload</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:kernel_autoload</span>), <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_custom_method</span>(<span class="ruby-identifier">klass_module</span>, <span class="ruby-value">:autoload</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:module_autoload</span>))

  <span class="ruby-comment"># remove BasicObject#method_missing</span>
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_method</span>(<span class="ruby-identifier">klass_basic_obj</span>, <span class="ruby-value">:method_missing</span>, <span class="ruby-keyword">false</span>, <span class="ruby-keyword">nil</span>)

  <span class="ruby-comment"># ENV: Hash[String, String]</span>
  <span class="ruby-identifier">str_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:str</span>])
  <span class="ruby-identifier">env_ty</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">gen_hash</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">str_ty</span>] = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">optional</span>(<span class="ruby-identifier">str_ty</span>) }
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_constant</span>(<span class="ruby-identifier">klass_obj</span>, <span class="ruby-value">:ENV</span>, <span class="ruby-identifier">env_ty</span>, <span class="ruby-keyword">nil</span>)

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">search_method</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:kernel</span>], <span class="ruby-keyword">false</span>, <span class="ruby-value">:sprintf</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mdefs</span>,<span class="ruby-operator">|</span>
    <span class="ruby-identifier">mdefs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mdef</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_method</span>(<span class="ruby-identifier">klass_vmcore</span>, <span class="ruby-value">:&quot;core#sprintf&quot;</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">mdef</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-array_aref" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">array_aref</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="array_aref-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 451</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">array_aref</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span>

  <span class="ruby-keyword">case</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">idx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Literal</span>)
      <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">idx</span>.<span class="ruby-identifier">lit</span>
      <span class="ruby-identifier">idx</span> = <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">idx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Integer</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">idx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Range</span>)
    <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">idx</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:range</span>])
      <span class="ruby-identifier">idx</span> = (<span class="ruby-keyword">nil</span><span class="ruby-operator">..</span><span class="ruby-keyword">nil</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">idx</span> = <span class="ruby-keyword">nil</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_array_elem_type</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">idx</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">when</span> <span class="ruby-value">2</span>
    <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_array_elem_type</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">id</span>)
    <span class="ruby-identifier">base_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:ary</span>])
    <span class="ruby-identifier">ret_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span><span class="ruby-operator">::</span><span class="ruby-constant">Elements</span>.<span class="ruby-identifier">new</span>([], <span class="ruby-identifier">ty</span>), <span class="ruby-identifier">base_ty</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ret_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-array_aset" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">array_aset</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="array_aset-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 477</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">array_aset</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">2</span>
    <span class="ruby-comment"># XXX: Support `ary[idx, len] = val`</span>
    <span class="ruby-comment">#raise NotImplementedError # XXX</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">idx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Literal</span>)
    <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">idx</span>.<span class="ruby-identifier">lit</span>
    <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">idx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Integer</span>)
      <span class="ruby-comment"># XXX: Support `ary[idx..end] = val`</span>
      <span class="ruby-comment">#raise NotImplementedError # XXX</span>
      <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">idx</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">last</span>

  <span class="ruby-identifier">env</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">update_container_elem_types</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">base_type</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">elems</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">idx</span>, <span class="ruby-identifier">ty</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-array_pop" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">array_pop</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="array_pop-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 507</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">array_pop</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_array_elem_type</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">id</span>)
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-get_sym" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">get_sym</span><span
                                class="method-args">(target, ty, ep, scratch)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="get_sym-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 5</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_sym</span>(<span class="ruby-identifier">target</span>, <span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>)
  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">ty</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>)
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;symbol expected&quot;</span>)
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">ty</span>.<span class="ruby-identifier">sym</span>
  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">sym</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-node">&quot;dynamic symbol is given to #{ target }; ignored&quot;</span>)
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">sym</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-hash_aref" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">hash_aref</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="hash_aref-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 519</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">hash_aref</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span>
  <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">recv</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>
      <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_hash_elem_type</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">idx</span>)
      <span class="ruby-identifier">ty</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ty</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span>.<span class="ruby-identifier">bot</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">ty</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-hash_aset" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">hash_aset</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="hash_aset-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 538</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">hash_aset</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">2</span>
    <span class="ruby-comment"># XXX: error?</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span>
  <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">globalize_type</span>(<span class="ruby-identifier">idx</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">last</span>

  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>
    <span class="ruby-comment"># to ignore: class OptionMap &lt; Hash</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">env</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">update_container_elem_types</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">base_type</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">elems</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">idx</span>, <span class="ruby-identifier">ty</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-kernel_Array" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">kernel_Array</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="kernel_Array-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 768</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">kernel_Array</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
  <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span>
  <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">globalize_type</span>(<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-identifier">all_ty</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">bot</span>
  <span class="ruby-identifier">ty</span>.<span class="ruby-identifier">each_child_global</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ty</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">ty</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span>)
      <span class="ruby-identifier">all_ty</span> = <span class="ruby-identifier">all_ty</span>.<span class="ruby-identifier">union</span>(<span class="ruby-identifier">ty</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">base_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:ary</span>])
      <span class="ruby-identifier">ret_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span><span class="ruby-operator">::</span><span class="ruby-constant">Elements</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">ty</span>]), <span class="ruby-identifier">base_ty</span>)
      <span class="ruby-identifier">all_ty</span> = <span class="ruby-identifier">all_ty</span>.<span class="ruby-identifier">union</span>(<span class="ruby-identifier">ret_ty</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">all_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-kernel_autoload" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">kernel_autoload</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="kernel_autoload-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 738</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">kernel_autoload</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">2</span>
    <span class="ruby-comment"># XXX: handle correctly</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">feature</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">1</span>]
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Literal</span>)
    <span class="ruby-identifier">feature</span> = <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">lit</span>

    <span class="ruby-identifier">action</span>, <span class="ruby-identifier">arg</span> = <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">file_require</span>(<span class="ruby-identifier">feature</span>, <span class="ruby-identifier">scratch</span>)
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">action</span>
    <span class="ruby-keyword">when</span> <span class="ruby-value">:do</span>
      <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">file_load</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
    <span class="ruby-keyword">when</span> <span class="ruby-value">:done</span>
    <span class="ruby-keyword">when</span> <span class="ruby-value">:error</span>
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-identifier">arg</span>)
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;autoload target cannot be identified statically&quot;</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-kernel_p" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">kernel_p</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="kernel_p-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 444</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">kernel_p</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">reveal_type</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">globalize_type</span>(<span class="ruby-identifier">aarg</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>))
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-kernel_require" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">kernel_require</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="kernel_require-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 669</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">kernel_require</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
    <span class="ruby-comment"># XXX: handle correctly</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">feature</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Literal</span>)
    <span class="ruby-identifier">feature</span> = <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">lit</span>

    <span class="ruby-keyword">unless</span> <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
      <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">action</span>, <span class="ruby-identifier">arg</span> = <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">file_require</span>(<span class="ruby-identifier">feature</span>, <span class="ruby-identifier">scratch</span>)
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">action</span>
    <span class="ruby-keyword">when</span> <span class="ruby-value">:do</span>
      <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">file_load</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
    <span class="ruby-keyword">when</span> <span class="ruby-value">:done</span>
      <span class="ruby-identifier">result</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-identifier">arg</span>])
      <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">result</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">when</span> <span class="ruby-value">:error</span>
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-identifier">arg</span>)
      <span class="ruby-identifier">result</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>
      <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">result</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;require target cannot be identified statically&quot;</span>)
    <span class="ruby-identifier">result</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">result</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-kernel_require_relative" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">kernel_require_relative</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="kernel_require_relative-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 703</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">kernel_require_relative</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
    <span class="ruby-comment"># XXX: handle correctly</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">feature</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">first</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Literal</span>)
    <span class="ruby-identifier">feature</span> = <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">lit</span>

    <span class="ruby-keyword">unless</span> <span class="ruby-identifier">feature</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
      <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">iseq</span>.<span class="ruby-identifier">absolute_path</span>), <span class="ruby-identifier">feature</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&quot;.rb&quot;</span> <span class="ruby-comment"># XXX</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">loaded_files</span>[<span class="ruby-identifier">path</span>]
      <span class="ruby-identifier">result</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:false</span>])
      <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">result</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">loaded_files</span>[<span class="ruby-identifier">path</span>] = <span class="ruby-keyword">true</span>

    <span class="ruby-keyword">return</span> <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">file_load</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span>(<span class="ruby-identifier">path</span>)

    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-node">&quot;failed to load: #{ path }&quot;</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;require target cannot be identified statically&quot;</span>)
    <span class="ruby-identifier">feature</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">result</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>])
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">result</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-lambda" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">lambda</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="lambda-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 61</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">lambda</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">blk_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_attr_accessor" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_attr_accessor</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_attr_accessor-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 417</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_attr_accessor</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;attr_accessor&quot;</span>, <span class="ruby-identifier">aarg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">next</span>
    <span class="ruby-identifier">cref</span> = <span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">cref</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_attr_method</span>(<span class="ruby-identifier">cref</span>.<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-value">:&quot;@#{ sym }&quot;</span>, <span class="ruby-value">:accessor</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">static_env</span>.<span class="ruby-identifier">pub_meth</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_attr_reader" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_attr_reader</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_attr_reader-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 426</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_attr_reader</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;attr_reader&quot;</span>, <span class="ruby-identifier">aarg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">next</span>
    <span class="ruby-identifier">cref</span> = <span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">cref</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_attr_method</span>(<span class="ruby-identifier">cref</span>.<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-value">:&quot;@#{ sym }&quot;</span>, <span class="ruby-value">:reader</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">static_env</span>.<span class="ruby-identifier">pub_meth</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_attr_writer" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_attr_writer</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_attr_writer-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 435</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_attr_writer</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;attr_writer&quot;</span>, <span class="ruby-identifier">aarg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">next</span>
    <span class="ruby-identifier">cref</span> = <span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">cref</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_attr_method</span>(<span class="ruby-identifier">cref</span>.<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-value">:&quot;@#{ sym }&quot;</span>, <span class="ruby-value">:writer</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">static_env</span>.<span class="ruby-identifier">pub_meth</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_autoload" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_autoload</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_autoload-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 764</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_autoload</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">kernel_autoload</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_define_method" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_define_method</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_define_method-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 386</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_define_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-node">&quot;Module#define with #{ aargs.lead_tys.size } argument is ignored&quot;</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">mid</span>, = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>
  <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mid</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>)
      <span class="ruby-identifier">mid</span> = <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">sym</span>
      <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">blk_ty</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">blk_ty</span><span class="ruby-operator">|</span>
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">blk_ty</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Proc</span>)
          <span class="ruby-identifier">blk</span> = <span class="ruby-identifier">blk_ty</span>.<span class="ruby-identifier">block_body</span>
          <span class="ruby-keyword">case</span> <span class="ruby-identifier">blk</span>
          <span class="ruby-keyword">when</span> <span class="ruby-constant">ISeqBlock</span>
            <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_define_iseq_method</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">iseq</span>, <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">outer_ep</span>)
          <span class="ruby-keyword">else</span>
            <span class="ruby-comment"># XXX: what to do?</span>
          <span class="ruby-keyword">end</span>
        <span class="ruby-keyword">else</span>
          <span class="ruby-comment"># XXX: what to do?</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-comment"># XXX: what to do?</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_eqq" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_eqq</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_eqq-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 166</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_eqq</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">aarg</span> = <span class="ruby-identifier">aarg</span>.<span class="ruby-identifier">base_type</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">aarg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>) <span class="ruby-comment"># XXX</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">aarg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>)
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">aarg</span>.<span class="ruby-identifier">klass</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">recv</span> <span class="ruby-comment"># XXX: inheritance</span>
          <span class="ruby-identifier">true_val</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>])
          <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">true_val</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
        <span class="ruby-keyword">else</span>
          <span class="ruby-identifier">false_val</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:false</span>])
          <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">false_val</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_extend" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_extend</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_extend-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 286</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_extend</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;Module#extend without an argument is ignored&quot;</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
    <span class="ruby-comment"># XXX: warn?</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>]
  <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
      <span class="ruby-identifier">aargs</span> = <span class="ruby-constant">ActualArguments</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">recv</span>], <span class="ruby-keyword">nil</span>, {}, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>)
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_send</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-value">:extended</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">_ret_ty</span>, <span class="ruby-identifier">_ep</span><span class="ruby-operator">|</span> }
      <span class="ruby-comment"># if ep.ctx.cref.singleton is true, the meta-meta level is ignored. Should we warn?</span>
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">mix_module</span>(<span class="ruby-value">:after</span>, <span class="ruby-identifier">recv</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">true</span>, <span class="ruby-identifier">ep</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_include" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_include</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_include-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 262</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_include</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;Module#include without an argument is ignored&quot;</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
    <span class="ruby-comment"># XXX: warn?</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment"># support multiple arguments: include M1, M2</span>
  <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>]
  <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
      <span class="ruby-identifier">aargs</span> = <span class="ruby-constant">ActualArguments</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">recv</span>], <span class="ruby-keyword">nil</span>, {}, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>)
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_send</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-value">:included</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">_ret_ty</span>, <span class="ruby-identifier">_ep</span><span class="ruby-operator">|</span> }
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">mix_module</span>(<span class="ruby-value">:after</span>, <span class="ruby-identifier">recv</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">cref</span>.<span class="ruby-identifier">singleton</span>, <span class="ruby-identifier">ep</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_module_function" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_module_function</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_module_function-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 331</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_module_function</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">enable_module_function</span>]
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;module_function&quot;</span>, <span class="ruby-identifier">aarg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">next</span>
      <span class="ruby-identifier">meths</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-keyword">false</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">sym</span>)
      <span class="ruby-identifier">meths</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mdef</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-keyword">true</span>, <span class="ruby-identifier">mdef</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_prepend" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_prepend</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_prepend-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 310</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_prepend</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;Module#prepend without an argument is ignored&quot;</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
    <span class="ruby-comment"># XXX: warn?</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>]
  <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">mix_module</span>(<span class="ruby-value">:before</span>, <span class="ruby-identifier">recv</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">cref</span>.<span class="ruby-identifier">singleton</span>, <span class="ruby-identifier">ep</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_private" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_private</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_private-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 366</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_private</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">method_public_set</span>(<span class="ruby-keyword">false</span>)]
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
      <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;private&quot;</span>, <span class="ruby-identifier">aarg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">next</span>
        <span class="ruby-identifier">meths</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-keyword">false</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">sym</span>)
        <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">meths</span>
        <span class="ruby-identifier">meths</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mdef</span><span class="ruby-operator">|</span>
          <span class="ruby-identifier">mdef</span>.<span class="ruby-identifier">pub_meth</span> = <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mdef</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:pub_meth=</span>)
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-comment"># XXX: warn?</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-module_public" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">module_public</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="module_public-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 346</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">module_public</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">method_public_set</span>(<span class="ruby-keyword">true</span>)]
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Class</span>)
      <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aarg</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;public&quot;</span>, <span class="ruby-identifier">aarg</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">next</span>
        <span class="ruby-identifier">meths</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-keyword">false</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">sym</span>)
        <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">meths</span>
        <span class="ruby-identifier">meths</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mdef</span><span class="ruby-operator">|</span>
          <span class="ruby-identifier">mdef</span>.<span class="ruby-identifier">pub_meth</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mdef</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:pub_meth=</span>)
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-comment"># XXX: warn?</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_block_given-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_block_given?</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_block_given-3F-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 241</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_block_given?</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">procs</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">bot</span>
  <span class="ruby-identifier">no_proc</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-identifier">env</span>.<span class="ruby-identifier">static_env</span>.<span class="ruby-identifier">blk_ty</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">blk_ty</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">blk_ty</span>
    <span class="ruby-keyword">when</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Proc</span>
      <span class="ruby-identifier">procs</span> = <span class="ruby-identifier">procs</span>.<span class="ruby-identifier">union</span>(<span class="ruby-identifier">blk_ty</span>)
    <span class="ruby-keyword">when</span> <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>
      <span class="ruby-identifier">no_proc</span> = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">procs</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Type</span>.<span class="ruby-identifier">bot</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>]), <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">replace_blk_ty</span>(<span class="ruby-identifier">procs</span>)]
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">no_proc</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:false</span>]), <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>.<span class="ruby-identifier">replace_blk_ty</span>(<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>)]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_class" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_class</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_class-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 122</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_class</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>.<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_enum_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_enum_for</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_enum_for-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 202</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_enum_for</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">mid_ty</span>, = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>
    <span class="ruby-identifier">naargs</span> = <span class="ruby-constant">ActualArguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span>], <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">rest_ty</span>, <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">kw_tys</span>, <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">blk_ty</span>)
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">rest_ty</span>
    <span class="ruby-identifier">mid_ty</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">rest_ty</span>
    <span class="ruby-identifier">naargs</span> = <span class="ruby-identifier">aargs</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">mid_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:each</span>, <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:sym</span>]))
    <span class="ruby-identifier">naargs</span> = <span class="ruby-identifier">aargs</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">elem_ty</span> = <span class="ruby-constant">Type</span>.<span class="ruby-identifier">bot</span>
  <span class="ruby-identifier">enum_for_blk</span> = <span class="ruby-constant">CustomBlock</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-identifier">mid</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">caller_ep</span>, <span class="ruby-identifier">caller_env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-value">replace_recv_ty:</span>, <span class="ruby-value">replace_cref:</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk_ctn</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">1</span>
      <span class="ruby-identifier">elem_ty</span> = <span class="ruby-identifier">elem_ty</span>.<span class="ruby-identifier">union</span>(<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>])
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">elem_ty</span> = <span class="ruby-identifier">elem_ty</span>.<span class="ruby-identifier">union</span>(<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>)
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span><span class="ruby-operator">::</span><span class="ruby-constant">Elements</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">elem_ty</span>, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>]), <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:enumerator</span>])), <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-identifier">blk_ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">caller_ep</span>, <span class="ruby-identifier">caller_env</span>]
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">enum_for_blk_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">enum_for_blk</span>, <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:proc</span>]))

  <span class="ruby-identifier">naargs</span> = <span class="ruby-constant">ActualArguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">naargs</span>.<span class="ruby-identifier">lead_tys</span>, <span class="ruby-identifier">naargs</span>.<span class="ruby-identifier">rest_ty</span>, <span class="ruby-identifier">naargs</span>.<span class="ruby-identifier">kw_tys</span>, <span class="ruby-identifier">enum_for_blk_ty</span>)
  <span class="ruby-identifier">mid_ty</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mid</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>)
      <span class="ruby-identifier">mid</span> = <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">sym</span>
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_send</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">naargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_ret_ty</span>, <span class="ruby-identifier">_ep</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span><span class="ruby-operator">::</span><span class="ruby-constant">Elements</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">elem_ty</span>, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>]), <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:enumerator</span>])), <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_instance_eval" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_instance_eval</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_instance_eval-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 152</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_instance_eval</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;instance_eval with arguments is ignored&quot;</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">naargs</span> = <span class="ruby-constant">ActualArguments</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">recv</span>], <span class="ruby-keyword">nil</span>, {}, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>)
  <span class="ruby-identifier">nrecv</span> = <span class="ruby-identifier">recv</span>
  <span class="ruby-identifier">nrecv</span> = <span class="ruby-identifier">nrecv</span>.<span class="ruby-identifier">base_type</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">nrecv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">ContainerType</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_invoke_block</span>(<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">blk_ty</span>, <span class="ruby-identifier">naargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-value">replace_recv_ty:</span> <span class="ruby-identifier">nrecv</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ret_ty</span>, <span class="ruby-identifier">ep</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ret_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_is_a-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_is_a?</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_is_a-3F-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 84</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_is_a?</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>)
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">klass</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>] <span class="ruby-comment"># XXX: inheritance</span>
        <span class="ruby-identifier">true_val</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>])
        <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">true_val</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">false_val</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:false</span>])
        <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">false_val</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_module_eval" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_module_eval</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_module_eval-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 187</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_module_eval</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">ep</span>, <span class="ruby-string">&quot;class_eval with arguments is ignored&quot;</span>)
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">naargs</span> = <span class="ruby-constant">ActualArguments</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">recv</span>], <span class="ruby-keyword">nil</span>, {}, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>)
  <span class="ruby-identifier">nrecv</span> = <span class="ruby-identifier">recv</span>
  <span class="ruby-identifier">nrecv</span> = <span class="ruby-identifier">nrecv</span>.<span class="ruby-identifier">base_type</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">nrecv</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">ContainerType</span>)
  <span class="ruby-identifier">ncref</span> = <span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">cref</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">nrecv</span>, <span class="ruby-keyword">true</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_invoke_block</span>(<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">blk_ty</span>, <span class="ruby-identifier">naargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-value">replace_recv_ty:</span> <span class="ruby-identifier">nrecv</span>, <span class="ruby-value">replace_cref:</span> <span class="ruby-identifier">ncref</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_ret_ty</span>, <span class="ruby-identifier">ep</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_privitive_method" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_privitive_method</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_privitive_method-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 237</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_privitive_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">mid</span>, <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:sym</span>])), <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_respond_to-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_respond_to?</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_respond_to-3F-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 102</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_respond_to?</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;respond_to?&quot;</span>, <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>)
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">sym</span>
      <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">singleton</span> = <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">method_dispatch_info</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_method</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">singleton</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">sym</span>)
        <span class="ruby-identifier">true_val</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>])
        <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">true_val</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">false_val</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:false</span>])
        <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">false_val</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">bool</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_s_new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_s_new</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_s_new-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 69</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_s_new</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">type_params</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">ContainerType</span>.<span class="ruby-identifier">create_empty_instance</span>(<span class="ruby-identifier">recv</span>)
    <span class="ruby-identifier">env</span>, <span class="ruby-identifier">ty</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">localize_type</span>(<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-constant">AllocationSite</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ep</span>).<span class="ruby-identifier">add_id</span>(<span class="ruby-value">:object_s_new</span>))
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">recv</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">meths</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-keyword">false</span>, <span class="ruby-keyword">false</span>, <span class="ruby-value">:initialize</span>)
  <span class="ruby-identifier">meths</span>.<span class="ruby-identifier">flat_map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">meth</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">meth</span>.<span class="ruby-identifier">do_send</span>(<span class="ruby-identifier">ty</span>, <span class="ruby-value">:initialize</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_ret_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_send" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_send</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="object_send-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 130</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_send</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">mid_ty</span>, = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">rest_ty</span>
    <span class="ruby-identifier">mid_ty</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">rest_ty</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">aargs</span> = <span class="ruby-constant">ActualArguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span>] <span class="ruby-operator">||</span> [], <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">rest_ty</span>, <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">kw_tys</span>, <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">blk_ty</span>)
  <span class="ruby-identifier">found</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-identifier">mid_ty</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mid</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>)
      <span class="ruby-identifier">found</span> = <span class="ruby-keyword">true</span>
      <span class="ruby-identifier">mid</span> = <span class="ruby-identifier">mid</span>.<span class="ruby-identifier">sym</span>
      <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_send</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">found</span>
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-proc_call" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">proc_call</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="proc_call-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 65</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">proc_call</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">do_invoke_block</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-struct_initialize" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">struct_initialize</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="struct_initialize-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 563</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">struct_initialize</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">struct_klass</span> = <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">klass</span>
  <span class="ruby-keyword">while</span> <span class="ruby-identifier">struct_klass</span>.<span class="ruby-identifier">superclass</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:struct</span>]
    <span class="ruby-identifier">struct_klass</span> = <span class="ruby-identifier">struct_klass</span>.<span class="ruby-identifier">superclass</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">struct_klass</span>.<span class="ruby-identifier">superclass</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:struct</span>]
    <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_ivar_read!</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">struct_klass</span>), <span class="ruby-value">:_keyword_init</span>, <span class="ruby-identifier">ep</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">keyword_init</span>, <span class="ruby-identifier">ep</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_ivar_read!</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">struct_klass</span>), <span class="ruby-value">:_members</span>, <span class="ruby-identifier">ep</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">member_ary_ty</span>, <span class="ruby-identifier">ep</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">member_ary_ty</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">keyword_init</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>])
        <span class="ruby-comment"># TODO: support kw_rest_ty</span>
        <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">kw_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val_ty</span><span class="ruby-operator">|</span>
          <span class="ruby-identifier">found</span> = <span class="ruby-keyword">false</span>
          <span class="ruby-identifier">member_ary_ty</span>.<span class="ruby-identifier">elems</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sym</span><span class="ruby-operator">|</span>
            <span class="ruby-keyword">if</span> <span class="ruby-identifier">sym</span>.<span class="ruby-identifier">sym</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">key</span>
              <span class="ruby-identifier">found</span> = <span class="ruby-keyword">true</span>
              <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_instance_variable</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">sym</span>.<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">val_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>)
            <span class="ruby-keyword">end</span>
          <span class="ruby-keyword">end</span>
          <span class="ruby-keyword">unless</span> <span class="ruby-identifier">found</span>
            <span class="ruby-comment"># TODO: what to do when not found?</span>
          <span class="ruby-keyword">end</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">member_ary_ty</span>.<span class="ruby-identifier">elems</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">zip</span>(<span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sym</span>, <span class="ruby-identifier">ty</span><span class="ruby-operator">|</span>
          <span class="ruby-identifier">ty</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>
          <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_instance_variable</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">sym</span>.<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>)
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-struct_s_new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">struct_s_new</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="struct_s_new-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 600</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">struct_s_new</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">keyword_init</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">kw_tys</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">kw_tys</span>[<span class="ruby-value">:keyword_init</span>] <span class="ruby-comment"># XXX: more canonical way to extract keyword...</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">kw_tys</span>[<span class="ruby-value">:keyword_init</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>])
      <span class="ruby-identifier">keyword_init</span> = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">fields</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">ty</span><span class="ruby-operator">|</span> <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;Struct.new&quot;</span>, <span class="ruby-identifier">ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) }.<span class="ruby-identifier">compact</span>
  <span class="ruby-identifier">struct_klass</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">new_struct</span>(<span class="ruby-identifier">ep</span>)

  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_singleton_custom_method</span>(<span class="ruby-identifier">struct_klass</span>, <span class="ruby-value">:new</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_s_new</span>))
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">set_singleton_custom_method</span>(<span class="ruby-identifier">struct_klass</span>, <span class="ruby-value">:[]</span>, <span class="ruby-constant">Builtin</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:object_s_new</span>))
  <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">field</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_attr_method</span>(<span class="ruby-identifier">struct_klass</span>, <span class="ruby-identifier">field</span>, <span class="ruby-identifier">field</span>, <span class="ruby-value">:accessor</span>, <span class="ruby-keyword">true</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">fields</span> = <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">field</span><span class="ruby-operator">|</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Symbol</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">field</span>, <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:sym</span>])) }
  <span class="ruby-identifier">base_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:ary</span>])
  <span class="ruby-identifier">fields</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Array</span><span class="ruby-operator">::</span><span class="ruby-constant">Elements</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">fields</span>), <span class="ruby-identifier">base_ty</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_ivar_write!</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">struct_klass</span>), <span class="ruby-value">:_members</span>, <span class="ruby-identifier">fields</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">add_ivar_write!</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">struct_klass</span>), <span class="ruby-value">:_keyword_init</span>, <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:true</span>]), <span class="ruby-identifier">ep</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">keyword_init</span>
  <span class="ruby-comment">#set_singleton_custom_method(struct_klass, :members, Builtin.method(:...))</span>

  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">struct_klass</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-vmcore_hash_merge_kwd" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">vmcore_hash_merge_kwd</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="vmcore_hash_merge_kwd-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 31</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">vmcore_hash_merge_kwd</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">h1</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">0</span>]
  <span class="ruby-identifier">h2</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>[<span class="ruby-value">1</span>]
  <span class="ruby-identifier">elems</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-identifier">h1</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h1</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">h1</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">h1</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>
      <span class="ruby-identifier">h1_elems</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_container_elem_types</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">h1</span>.<span class="ruby-identifier">id</span>)
      <span class="ruby-identifier">h2</span>.<span class="ruby-identifier">each_child</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h2</span><span class="ruby-operator">|</span>
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">h2</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Local</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">h2</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>
          <span class="ruby-identifier">h2_elems</span> = <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">get_container_elem_types</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">h2</span>.<span class="ruby-identifier">id</span>)
          <span class="ruby-identifier">elems0</span> = <span class="ruby-identifier">h1_elems</span>.<span class="ruby-identifier">union</span>(<span class="ruby-identifier">h2_elems</span>)
          <span class="ruby-keyword">if</span> <span class="ruby-identifier">elems</span>
            <span class="ruby-identifier">elems</span> = <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">union</span>(<span class="ruby-identifier">elems0</span>)
          <span class="ruby-keyword">else</span>
            <span class="ruby-identifier">elems</span> = <span class="ruby-identifier">elems0</span>
          <span class="ruby-keyword">end</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">elems</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span><span class="ruby-operator">::</span><span class="ruby-constant">Elements</span>.<span class="ruby-identifier">new</span>({<span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">Type</span>.<span class="ruby-identifier">any</span>})
  <span class="ruby-identifier">base_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Builtin</span>[<span class="ruby-value">:hash</span>])
  <span class="ruby-identifier">ret_ty</span> = <span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">elems</span>, <span class="ruby-identifier">base_ty</span>)
  <span class="ruby-identifier">ctn</span>[<span class="ruby-identifier">ret_ty</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-vmcore_raise" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">vmcore_raise</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="vmcore_raise-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 57</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">vmcore_raise</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-comment"># no-op</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-vmcore_set_method_alias" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">vmcore_set_method_alias</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="vmcore_set_method_alias-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 18</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">vmcore_set_method_alias</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">new_mid</span>, <span class="ruby-identifier">old_mid</span> = <span class="ruby-identifier">aargs</span>.<span class="ruby-identifier">lead_tys</span>
  <span class="ruby-identifier">new_sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;alias&quot;</span>, <span class="ruby-identifier">new_mid</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">return</span>
  <span class="ruby-identifier">old_sym</span> = <span class="ruby-identifier">get_sym</span>(<span class="ruby-string">&quot;alias&quot;</span>, <span class="ruby-identifier">old_mid</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">scratch</span>) <span class="ruby-keyword">or</span> <span class="ruby-keyword">return</span>
  <span class="ruby-identifier">scratch</span>.<span class="ruby-identifier">alias_method</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">ep</span>.<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">cref</span>.<span class="ruby-identifier">singleton</span>, <span class="ruby-identifier">new_sym</span>, <span class="ruby-identifier">old_sym</span>, <span class="ruby-identifier">ep</span>)
  <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-vmcore_undef_method" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">vmcore_undef_method</span><span
                                class="method-args">(recv, mid, aargs, ep, env, scratch, &amp;ctn)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="vmcore_undef_method-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/builtin.rb, line 26</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">vmcore_undef_method</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-identifier">aargs</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">scratch</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">ctn</span>)
  <span class="ruby-comment"># no-op</span>
  <span class="ruby-identifier">ctn</span>[<span class="ruby-constant">Type</span>.<span class="ruby-identifier">nil</span>, <span class="ruby-identifier">ep</span>, <span class="ruby-identifier">env</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

